<?php
/* @var $this UserController */
/* @var $model User */
/* @var $form CActiveForm */
?>
<h1>Đăng ký tài khoản</h1>
<div class="form ">

<?php $form=$this->beginWidget('bootstrap.widgets.TbActiveForm', array(
	'id'=>'user-form',
	//'enableAjaxValidation'=>true,
	'enableClientValidation'=>true,
	'htmlOptions'=>array('style'=>"width:100%;")
)); ?>

	<?php //echo $form->errorSummary($model); ?>

	<div style="width:50%; display:block; float: left;">
		<div class="row">
			<?php echo $form->textFieldRow($model,'username',array('size'=>50,'maxlength'=>50)); ?>
		</div>
		<div class="row">
			<?php echo $form->passwordFieldRow($model,'password',array('size'=>60,'maxlength'=>100)); ?>
		</div>
		
		<div class="row">
			<?php echo $form->passwordFieldRow($model,'confirm',array('size'=>60,'maxlength'=>100)); ?>
		</div>
	
		<div class="row">
			<?php echo $form->labelEx($model,'email'); ?>
			<?php echo $form->emailField($model,'email'); ?>
			<?php echo $form->error($model,'email'); ?>
		</div>
		
		<div class="row">
			<?php echo $form->textFieldRow($model,'hoten'); ?>
		</div>

	</div>
	<div style="width:50%; display:block; float: left;">
			
		<div class="row">
			<?php echo $form->textFieldRow($model,'dienthoai',array('rows'=>6, 'cols'=>50)); ?>
		</div>
		
		<div class="row">
			<?php echo $form->labelEx($model,'ngaysinh'); ?>		
			<?php Yii::import('application.extensions.CJuiDateTimePicker.CJuiDateTimePicker');
			   	 $this->widget('CJuiDateTimePicker',array(
			        'model'=>$model, //Model object
			        'attribute'=>'ngaysinh', //attribute name
			                'mode'=>'date',//use "time","date" or "datetime" (default)
			        'options'=>array(), // jquery plugin options
			    	 'language' => ''
			    ));
			?>
		<?php echo $form->error($model,'ngaysinh'); ?>
		</div>
	
		<div class="row">
			<?php echo $form->textAreaRow($model,'diachi',array('size'=>60,'maxlength'=>128, 'style'=>'width:300px;')); ?>
		</div>
	
		
		
		<?php if(CCaptcha::checkRequirements()): ?>
		<div class="row">
			<?php $this->widget('MyCaptcha'); ?>
			<?php echo $form->textFieldRow($model,'verifyCode'); ?>
		</div>
		<?php endif; ?>
		
	
		<div class="row buttons">
			<?php $this->widget('bootstrap.widgets.TbButton', array('buttonType'=>'submit', 'label'=>'Đăng ký', 'type'=>'inverse','htmlOptions'=>array('id'=>'submit'))); ?>
		</div>
	</div><!-- end left -->
<?php $this->endWidget(); ?>

</div><!-- form -->